<!DOCTYPE html>

<html class="no-js">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title></title>
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />

  <script src="https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js"></script>

  <script src="../../cdn/vue/vue.global.min.js"></script>
  <link rel="stylesheet" href="../../cdn/element-plus/index.css" />
  <script src="../../cdn/element-plus/index.full.min.js"></script>
  <link rel="stylesheet" href="../../../lib/index.css" />
  <script src="../../../lib/avue.js"></script>
</head>

<body>
  <div id="app">
    <avue-crud :data="data" :option="option"></avue-crud>
  </div>
</body>
<script>
  var app = Vue.createApp({
    data() {
      return {
        data: [
          {
            name: '张三',
            sex: '男'
          }, {
            name: '李四',
            sex: '女'
          }
        ],
        option: {
          page: false,
          align: 'center',
          menuAlign: 'center',
          column: [
            {
              label: '姓名',
              prop: 'name',
              formatter: function (row, value, label, column) {
                return row.name + '自定义'
              }
            }, {
              label: '性别',
              prop: 'sex',
              filter: true,
              dicData: [{ label: '男', value: '男' }, { label: '女', value: '女' }],
              filterMethod: function (value, row, column) {
                return row.sex === value;
              }
            }
          ]
        }
      }
    }
  })
  app.use(ElementPlus)
  app.use(AVUE)
  app.mount('#app')
</script>

</html>